﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace tema_pattern
{
    class Client
    {
        string nume;
        int varsta;
        List<Masina> automobile;

        public Client() { }

        public Client(string n, int v)
        {
            nume = n;
            varsta = v;
            automobile = new List<Masina>();
        }

        public void addCar(Masina m)
        {
            automobile.Add(m);
        }
        public void print()
        {
            Console.WriteLine("Clientul **- " + nume + " -** detine in proprietate urmatoarele automobile : ");
            Console.WriteLine();
            Console.WriteLine("Marca\tCuloare\tTrans\tTip\tMotor\tLungime\tDotari");
            foreach (Masina m in automobile)
                m.print();
            Console.WriteLine();
        }
        public string get_nume()
        {
            return nume;
        }


    }
}
